<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterkfMybankOrderRecordAddColumnRefundPrice extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('mybank_order_record', function (Blueprint $table) {
            $table->unsignedInteger("netPaidAmount")->default(0)->comment("净支付 总支付-总退款")
                  ->after('paidBrokerage');
            $table->unsignedInteger("refundAmount")->default(0)->comment("总退款金额")->after('paidBrokerage');
            $table->unsignedInteger("refundStatus")->default(0)->comment("退款状态 0无 1 退款中 2 退款成功")
                  ->after('payStatus');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('mybank_order_record', function (Blueprint $table) {
            $table->dropColumn("netPaidAmount");
            $table->dropColumn("refundAmount");
            $table->dropColumn("refundStatus");
        });
    }
}
